<script>
    import {MenuList} from "./menu";
    import BaseMessage from '@c/BaseMessage/BaseMessage'
    export default {
        data() {
            return {
                MenuList,
                showmessage: false,
                mymessage: '',
            }
        },
        components: {
            BaseMessage,
        },
        methods: {
            /**
             * @Description 全局消息提示
             * @author Anonymous
             * @date 2019/6/6
             */
            myMessage(message) {
                this.mymessage = message
                this.showmessage = true
                setTimeout(() => {
                    this.mymessage = ''
                    this.showmessage = false
                }, 1500)
            },
            /**
             * @Description 跳转页面
             * @author Anonymous
             * @date 2019/6/17
             */
            e_gopage(v){
                if(v.isOpen&&v.path){
                    wx.navigateTo({
                        url:v.path
                    })
                }else{
                    this.myMessage('敬请期待')
                }

            }

        },
        mounted() {
        },
        created() {
        }
    }
</script>
<template>
    <div class="Mine">
        <!-- 个人中心顶部-->
        <div class="Mine_top">
            <!--用户头像-->
            <div class="userImgArea">
                <img class="imgiCon"
                     src="https://maishouxiantuan.oss-cn-beijing.aliyuncs.com/ui/mine/5f52cb0367134cbbbd87ef07c9e48f7a.jpeg"
                     alt="">
                <img class="userlevel"
                     src="https://maishouxiantuan.oss-cn-beijing.aliyuncs.com/ui/mine/%E6%99%AE%E9%80%9A%E4%BC%9A%E5%91%98%402x.png"
                     alt="">
            </div>
        </div>
        <!--用户信息-->
        <div class="userInfoArea">
            <span class="userName">请登录</span>
            <span class="userNumber">手机号码预留</span>
        </div>
        <!--用户功能区-->
        <div class="userServerArea">
            <div class="MenuList" v-for="(v,i) in MenuList" :key="i" @click.stop="e_gopage(v)">
                <span class="menuName">{{v.label}}</span>
                <img class="goICon" src="/static/images/right.png" alt="">
            </div>
        </div>
        <!--退出登录-->
        <div class="loginOut">
            <span>退出登录</span>
        </div>
        <!--全局提示消息-->
        <BaseMessage :message="mymessage" v-if="showmessage"/>
    </div>
</template>
<style lang='scss'>
    @import "mine";
</style>
